package com.liao.badminton.dto;

import com.liao.badminton.code.BaseField;
import com.liao.badminton.code.validation.Delete;
import com.liao.badminton.code.validation.Insert;
import com.liao.badminton.code.validation.Update;
import io.swagger.annotations.ApiModelProperty;
import com.liao.badminton.entity.BadmintonGroup;
import javax.validation.constraints.NotNull;
import java.util.List;
import lombok.Data;
import com.liao.badminton.code.validation.FindDetail;
import java.lang.String;
import java.math.BigDecimal;
import java.util.Date;

/**
* @author liaocheng
* @date 2024-11-15
* description:群表
*/
@Data
public class BadmintonGroupDto extends BaseField {

    @ApiModelProperty(value = "id")
    @NotNull(message = "主键id不能为空",groups = {Update.class, FindDetail.class})
    private Long id;

    @ApiModelProperty(value = "8位唯一码")
    private String groupCode;

    @ApiModelProperty(value = "群名字")
    @NotNull(message = "群名字不能为空",groups = {Insert.class})
    private String groupName;
    @ApiModelProperty(value = "群昵称")
    private String userGroupName;

    @ApiModelProperty(value = "发布打水次数")
    private Integer competitionNum;

    @ApiModelProperty(value = "发布活动次数")
    private Integer activityNum;
    private Integer collectType;  //收费方式：0均摊，1固定
    private BigDecimal fixedMale;  //男生固定价格
    private BigDecimal fixedFemale;  //女生固定价格
    @ApiModelProperty(value = "女生优惠价格5")
    private BigDecimal femaleDiscountPrice;

    @ApiModelProperty(value = "每桶球数:12")
    private Integer bucketBallNum;

    @ApiModelProperty(value = "每桶球价格:120")
    private BigDecimal bucketPerPrice;

    @ApiModelProperty(value = "场地数量默认1")
    private Integer siteNum;

    @ApiModelProperty(value = "每片场地每小时价格")
    private BigDecimal sitePerPrice;
    @ApiModelProperty(value = "时长：一般是两小时")
    private BigDecimal timeLength;

    @ApiModelProperty(value = "用户id")
    private Long userId;
    @ApiModelProperty(value = "进群类型：0管理确认，1自动")
    private Long joinType;
    private BigDecimal extraPerCost;  //额外每人：2玩
    private BigDecimal extraFixedCost;  //额外固定：组一场球收50

    @NotNull(message = "主键id不能为空",groups = {Delete.class})
    private List<Long> delIds;  //批量删除ids

    public BadmintonGroup invertEntity(){
        BadmintonGroup dto = new BadmintonGroup();
        BaseField.invert(this, dto);
        dto.setId(this.getId());
        dto.setGroupCode(this.getGroupCode());
        dto.setGroupName(this.getGroupName());
        dto.setCompetitionNum(this.getCompetitionNum());
        dto.setActivityNum(this.getActivityNum());
        dto.setCollectType(this.getCollectType());
        dto.setFixedMale(this.getFixedMale());
        dto.setFixedFemale(this.getFixedFemale());
        dto.setFemaleDiscountPrice(this.getFemaleDiscountPrice());
        dto.setBucketBallNum(this.getBucketBallNum());
        dto.setBucketPerPrice(this.getBucketPerPrice());
        dto.setSiteNum(this.getSiteNum());
        dto.setSitePerPrice(this.getSitePerPrice());
        dto.setTimeLength(this.getTimeLength());
        dto.setJoinType(this.getJoinType());
        dto.setExtraPerCost(this.getExtraPerCost());
        dto.setExtraFixedCost(this.getExtraFixedCost());
        return dto;
    }
}
